package org.csu.mypetstore.service;

import org.csu.mypetstore.domain.Order;
import org.csu.mypetstore.persistence.OrderMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderService {
    @Autowired
    private OrderMapper orderMapper;

    public List<Order> getOrderList () {
        return orderMapper.getOrderList();
    }

    public Order getOrderByOrderId(int orderid) {
        return orderMapper.getOrderByOrderId(orderid);
    }

    public void updateOrder(Order order) {
        orderMapper.updateOrder(order);
    }

    public void setOrderReady (Order order) {
        orderMapper.setOrderReady(order);
    }
}
